﻿namespace KinonekoSoftware.CodariaDB.Documents.DataParts.Modules
{
    public sealed class Block_Color : ModuleBlock
    {
        public static Block_Color CreateInstance() => new Block_Color
        {
            Id          = ID.Get(),
            Title       = "颜色组设定",
            Description = "用来实现固定颜色值",
            Items = new List<Element_Color>
            {
                new Element_Color { Id = ID.Get(), Title = "血量", Value = "#808000" },
                new Element_Color { Id = ID.Get(), Title = "攻击", Value = "#ff7f50" },
                new Element_Color { Id = ID.Get(), Title = "耐力", Value = "#6495ed" },
                new Element_Color { Id = ID.Get(), Title = "速度", Value = "#dc143c" },
                new Element_Color { Id = ID.Get(), Title = "防御", Value = "#9370db" },
            },
        };

        public required List<Element_Color> Items { get; init; }

        public override ModuleBlock Clone() => new Block_Color
        {
            Id          = Id,
            Title       = Title,
            Description = Description,
            Items       = Items.Select(x => (Element_Color)x.Clone()).ToList(),
        };
    }
}